{template header}
<a href="?c=admin&a=allRunData&t=1" target="_self"><i class="icon-eye-open"></i> 绑定用户</a> &nbsp;&nbsp;
<a href="?c=admin&a=allRunData&t=2" target="_self"><i class="icon-eye-close"></i> 带心情数据</a> &nbsp;&nbsp;
<a href="?c=admin&a=allRunData&t=3" target="_self"><i class="icon-eye-close"></i> 游客数据</a> &nbsp;&nbsp;
<a href="{$overSpeedUrl}" target="_self"><i class="icon-plane"></i> 异常数据</a>
<div class="bs-docs-example pt-15">
    <table class="table table-striped">
        <thead>
            <tr>
                <th>昵称</th>
                <th>里程</th>
                <th>时长</th>
                <th>时速</th>
                <th>步速</th>
                <th>卡路里</th>
                
                <th>完成度</th>
                <th>心情</th>
                <th>跑步时间</th>
                <th>提交时间</th>
                <th>版本号</th>
                <th>异常类型</th>
                <th>状态</th>
                <th>操作</th>

            </tr>
        </thead>
        <tbody>
            {loop $runData $k $v}
            <tr>
                <td><a href="?c=admin&a=userinfo&uid=$v['uid']" target="_blank">{$v['nickname']}</a>
                </td>
                <td>{$v['mileage']}</td>
                <td>{$v['elapsedtime']}秒</td>
                <td>{$v['speed']}</td>
                <td>{$v['legspeed']}</td>
                <td>{$v['calorie']}</td>
                <td>{$v['target_rate']}</td>
                <td>{$v['expression_id']} / {$v['run_mood']}</td>
                <td>{eval echo date('Y-m-d H:i:s', $v['updatetime']);}</td>
                <td>{eval echo date('Y-m-d H:i:s', $v['addtime']);}</td>
                <td>$v['version']</td>
                <td>$abnorData[$v['overSpeed']]</td>
                <td>{if $v['is_delete'] == 1}<i class="icon-remove"></i>{else}<i class="icon-ok">{/if}</td>
                <td>
                    <a data-toggle="modal" data-remote="?c=admin&a=viewRoute&t={$type}&did={$v['did']}" class="btn btn-success" data-target="#routeMap">路线</a>
                    {if $v['is_delete'] == 0}<a class="btn btn-success" href="?c=admin&a=dealMedal&did={$v['did']}&uid={$v['uid']}">补发勋章</a>{/if}
                    {if $v['overSpeed'] != 0}
                    <a class="btn btn-normal" href="?c=admin&a=abToNorData&did=$v['did']&t={$type}&id={if $type == 1}{$v['uid']}{else}{$v['vid']}{/if}" onclick="return confirm('Are you sure?')">标记正常</a>
                    {else}
                  <!--  <a class="btn btn-normal" href="?c=admin&a=recoverRunData&did=$v['did']&t={$type}&id={if $type == 1}{$v['uid']}{else}{$v['vid']}{/if}"></a>  -->
                    {/if}

                     {if $v['is_delete'] == 0}
                    <a class="btn btn-danger" href="?c=admin&a=delRunData&did=$v['did']&t={$type}&id={if $type == 1}{$v['uid']}{else}{$v['vid']}{/if}" onclick="return confirm('Are you sure?')">删除</a>
                    {else}
                    <a class="btn btn-danger" href="?c=admin&a=recoverRunData&did=$v['did']&t={$type}&id={if $type == 1}{$v['uid']}{else}{$v['vid']}{/if}">恢复</a>
                    {/if}
                </td>
            </tr>
            {/loop}
        </tbody>
    </table>
</div>
<div class="pagination">
    <ul>
        {$pageStr}
    </ul>
</div>
<div id="routeMap" class="modal hide fade"  tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel">查看跑步路线</h3>
    </div>
    <div class="modal-body">        
    </div>
    <div class="modal-footer">
        <a href="#" class="btn" data-dismiss="modal">关闭</a>        
    </div>
</div>
<script type="text/javascript">
    $("#routeMap").on("hidden", function() {
        $(this).removeData("modal");
    });
</script>
{template footer}
